User Interface for Adjusting Game Preferences#4
User Interface for Adjusting Game Preferences#4albertliangcode wants to merge 2 commits intoAdamYee:masterfrom
Conversation
program quits after line 35, ui.js
| // Adjust Dimensions of Base | ||
| var edgeThickness = 2 * (parseInt($(".cell").css("border-left-width")) + parseInt($(".cell").css("margin")) + parseInt($(".cell").css("padding"))); | ||
| $(".base").height(numRow * ($(".cell").height() + edgeThickness) + 10); | ||
| $(".base").width(numCol * ($(".cell").width() + edgeThickness) + 10); |
There was a problem hiding this comment.
You won't need to do these hacks if you apply the proper CSS rules to the board and cells. Delete the above 3 lines after adding these styles.
.base {
display: inline-block; /* inline block will remove the grey space to the right - that's the difference between block and inline-block */
padding: 5px; /* this will compensate for the removing of top/left styles */
background-color: gray;
}
.cell {
background-color: blue;
height: 30px;
width: 30px;
position: relative;
display: inline-block; /* <------------ Remove this because you override with display: flex below */
margin: 2px;
padding: 2px;
text-align: center;
color: blue;
left: 5px; /* <------------ Remove this */
display: flex;
align-items: center;
justify-content: center;
}
.row {
display: block;
border: 0px;
position: relative;
top: 5px; /* <------------ Remove this */
display: flex;
}|
After I locally fixed the above issues, I found another:
Once these things are resolved, then the next step is to decouple jquery code. It's very tempting to just use |
This is just so that you can track me as I keep tinkering with the code. Classes start on January 4th, so I may not be able to spend much time on this in the coming weeks. Please don't feel rushed to reply to anything I write - I'll keep shuffling along!